package jm.java.stringTable;

/**
 * @Description StringTable 垃圾回收
 * @date 2022/3/19 15:45
 */
public class StringTableGC {
    public static void main(String[] args) {
        int i = 0;
        try{
            for (int j = 0; j < 100; j++) {
                String.valueOf(j).intern();
                i++;
            }
        }catch (Throwable e){
            e.printStackTrace();
        }finally {
            System.out.println(i);
        }
    }
}
